local sk__zhendu = fk.CreateSkill {

  name = "sk__zhendu",

  tags = {  },

}



sk__zhendu:addEffect(fk.EventPhaseStart, {
  name = "sk__zhendu",
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target.phase == Player.Play and player:hasSkill(sk__zhendu.name) and not target.dead
  end,
  on_cost = function(self, event, target, player, data)
    local prompt = "#sk__zhendu1-invoke::"..target.id
    if target == player then
      prompt = "#sk__zhendu2-invoke"
    end
    return player.room:askForSkillInvoke(player, sk__zhendu.name, nil, prompt)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:doIndicate(player.id, {target.id})
    if target ~= player then
      room:loseHp(target, 1, sk__zhendu.name)
    end
    if not target.dead then
      room:setPlayerMark(target, "@@sk__zhendu-turn", 1)
    end
  end,
})

sk__zhendu:addEffect(fk.DamageCaused, {
  name = "#sk__zhendu_trigger",
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target and target.phase ~= Player.NotActive and player:usedSkillTimes("sk__zhendu", Player.HistoryTurn) > 0 and
      not data.chain and data.to ~= player
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    data.damage = data.damage + 1
  end,
})

return sk__zhendu